import { number } from "echarts";

export interface DlgSelApproveFlowSendProps {
  billId: string;
  billKey: string;
  mdCode: string;
  mdCName: string;
  billStatus: string;
  appStatus: string;
  uniqueKey: string;
  editableStatus?: string[];
  app?: string;
}

export interface DlgSelApproveFlowSendState {
  viewModeMsg?: string;
  AppId?: number;
  appFlows?: FlowDefineInfo[];
  appFlowsFilter?: FlowDefineInfo[];
  activeFlow?: FlowDefineInfo;
  scrollHeight?: number;
  flowNodes?: {}[];
  appTitle?: string;
  activeNodeIdx?: number;
}

export interface DlgSelApproveFlowSendAppInFo { AppId: number, AppStatus?: string };

export interface FlowChartPathNode {
  /**
   * 节点名称
   */
  NodeName?: string;

  /**
   *审批用户
   */
  AppUsers?: string;

  /**
   *已审批用户
   */
  AppedUsers?: string;

  /**
   *审批意见
   */
  AppDetail?: string;

  /**
   * 审批时间
   */
  AppDateTime?: string;

  /**
   * 审批类型：审批，审阅
   */
  AppNodeType?: string;

  /**
   * 回复状态
   */
  ReplyStatus?: string;

  /**
   * 当前节点发送类型
   */
  SendType?: string;

  /**
   * 审批发送人
   */
  SendUser?: string;

  /**
   * 审批回复类型
   */
  StepAppInFo?: string;

  /**
   *是否为启动节点
   */
  IsStartNode?: boolean;
  Child?: FlowChartPathNode[];
  AppThroughType?: string; // A 会签 + B 多数同意通过 + C 任意人同意通过
  ApproveNumber?: number; // 发起审批的次数
  NodeId?: number; // 节点id
  PreNodeId?: number; // 上级节点ID
}

export interface FlowDefineInfo {
  FlowName: string;
  TempTitle?: string;
  FlowGuid: string;
  IsMainFlow?: string;
  IsTempApp?: boolean;
  BillRealType: string;
  BillType: string;
  MdCode: string;
  ProjectName?: string;
  AppPage?: string;
  NoticType?: string;
  CanFilterFields?: string;

  IsCanDirectPass?: boolean;
  IsMachineFlowRule?: boolean;
  AppUsers?: Array<{}>;
  AppPaths?: FlowChartPathNode[];
}
